<template>
  <div>
    <withTable :tFId="tFId" :formulaParams="{tableId:params.tableId,methodId: props.methodId}" :tableConfig="props.params" :userParams="{methodId:props.methodId}"/>
  </div>
</template>

<script setup>
import withTable from "./withTable.vue";

import bus from "@/utils/eventBus";
const tFId = ref("");
const params = ref({ isChild: 0 });
const props = defineProps({
  params: {
    type: Object,
    required: true,
  },
  methodId:{
    type: String
  },
});
function eventResult() {
  bus.emit("eventResult");
}
nextTick(() => {
  params.value = props.params;
  tFId.value = props.params.tFId;
})

onBeforeUnmount(() => {
  bus.off("submit" + tFId.value);
});
</script>